JBoss Community Archive (Read Only)

Teiid 8.3

Developer's Guide

Legal Notice

This guide contains information for developers creating custom solutions with Teiid. It covers creating JEE JCA connectors with the Teiid framework, Teiid Translators, Teiid User Defined Functions (UDFs) as well as related topics.

Integrating data from a Enterprise Information System (EIS) into Teiid, is separated into two parts.

  1. A Translator, which is required.

  2. An optional Resource Adapter, which will typically be a JCA Resource Adapter (also called a JEE Connector)

A Translator is used to:

A Resource Adapter is used to:

Do You Need a New Translator?

Teiid provides several translators for common enterprise information system types. If you can use one of these enterprise information systems, you do not need to develop a custom one.

Teiid offers the following translators:

  • JDBC Translator

    Works with many relational databases. The JDBC translator is validated against the following database systems: Oracle, Microsoft SQL Server, IBM DB2, MySQL, Postgres, Derby, Sybase, H2, and HSQL. In addition, the JDBC Translator can often be used with other 3rd-party drivers and provides a wide range of extensibility options to specialize behavior against those drivers.

  • File Translator

    Provides a procedural way to access the file system to handle text files.

  • WS Translator

    Provides procedural access to XML content using Web Services.

  • LDAP Translator

    Accesses to LDAP directory services.

  • Salesforce Translator

    Works with Salesforce interfaces.

Custom Translators

Below are the high-level steps for creating custom Translators. This guide covers how to do each of these steps in detail. It also provides additional information for advanced topics, such as streaming large objects.

For sample Translator code, refer to the Teiid source code at http://anonsvn.jboss.org/repos/teiid/trunk/connectors/.

  1. Create a new or reuse an existing Resource Adapter for the EIS system, to be used with this Translator.
    Refer to Custom Resource Adapters.

  2. Implement the required classes defined by the Translator API.

  3. Create an ExecutionFactory – Extend the org.teiid.translator.ExecutionFactory class

  4. Create relevant Executions (and sub-interfaces) – specifies how to execute each type of command
    Refer to Translator Development.

  5. Define the template for exposing configuration properties. Refer to Packaging.

  6. Deploy your Translator. Refer to Deployment.

  7. Deploy a Virtual Database (VDB) that uses your Translator.

  8. Execute queries via Teiid.

Do You Need a New Resource Adapter?

As mentioned above, for every Translator that needs to gather data from external source systems, it requires a resource adapter.

The following resource adapters are available to Teiid.

  • DataSource: This is provided by the JBoss AS container. This is used by the JDBC Translator.

  • File: Provides a JEE JCA based Connector to access defined directory on the file system. This is used by the File Translator

  • WS: Provides JEE JCA Connector to invoke Web Services using JBoss Web services stack. This is used by the WS Translator

  • LDAP: Provides JEE JCA connector to access LDAP; Used by the LDAP Translator.

  • Salesforce: Provides JEE JCA connector to access Salesforce by invoking their Web Service interface. Used by the SalesForce Translator.

Custom Resource Adapters

High-level Resource Adapter development procedure:

  1. Understand the JEE Connector specification to have basic idea about what JCA connectors are how they are developed and packaged.
    Refer to http://java.sun.com/j2ee/connector/.

  2. Gather all necessary information about your Enterprise Information System (EIS). You will need to know:

    • API for accessing the system

    • Configuration and connection information for the system

    • Expectation for incoming queries/metadata

    • The processing constructs, or capabilities, supported by information system.

    • Required properties for the connection, such as URL, user name, etc.

  3. Base classes for all of the required supporting JCA SPI classes are provided by the Teiid API. The JCA CCI support is not provided from Teiid, since Teiid uses the Translator API as it's common client interface. You will want to extend:

    • BasicConnectionFactory – Defines the Connection Factory

    • BasicConnection – represents a connection to the source.

    • BasicResourceAdapter – Specifies the resource adapter class

  4. Package your resource adapter. Refer to Build and Package the Adapter.

  5. Deploy your resource adapter. Refer to Build and Package the Adapter.

This guide covers how to do each of these steps in detail. It also provides additional information for advanced topics, such as transactions. For sample resource adapter code refer to the Teiid Source code at http://anonsvn.jboss.org/repos/teiid/trunk/connectors/.

Other Teiid Development

Teiid is highly extensible in other ways:

  • You may adapt logging to your needs, which is especially useful for custom audit or command logging. Refer to Custom Logging.

  • You may change the subsystem for custom authentication and authorization. Refer to Login Modules.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:37:53 UTC, last content change 2013-03-14 16:27:08 UTC.